package org.jaronsource.framework.plugins.security.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;

public class SecurityToken implements Serializable {

	private static final long serialVersionUID = -992044511058508969L;

	private ISecurityUser user;

	private Collection<IPerm> perms = new ArrayList<IPerm>();

	public SecurityToken() {}

	public SecurityToken(	ISecurityUser user, Collection<IPerm> perms ) {
		this.user = user;
		this.perms = perms;
	}

	public void setUser( ISecurityUser user ) {
		this.user = user;
	}

	public ISecurityUser getUser() {
		return user;
	}

	public void setPerms( Collection<IPerm> perms ) {
		this.perms = perms;
	}

	public Collection<IPerm> getPerms() {
		return perms;
	}

	public void addPerm( IPerm perm ) {
		this.perms.add( perm );
	}
}
